package com.shaoshaohuo.app.utils.city.json;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Arrays;
import java.util.List;

public class Data implements Parcelable {
	private List<list> list;

	public Data() {
		super();
	}


	public void setList(List<list> list) {
		this.list = list;
	}

	public List<list> getList() {
		return this.list;
	}

	public Data(Parcel source) {
		Parcelable[] pars = source.readParcelableArray(list.class.getClassLoader());
		list = Arrays.asList(Arrays.asList(pars).toArray(new list[pars.length]));
	}
	
	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeParcelableArray(list.toArray(new list[list.size()]), flags);
	}
	
	public static final Creator<Data> CREATOR = new Creator<Data>() {

		@Override
		public Data createFromParcel(Parcel source) {
			return new Data(source);
		}

		@Override
		public Data[] newArray(int size) {
			return new Data[size];
		}
		
	};
}